<template>
  <h2>App父级组件</h2>
  <button @click="isShow = !isShow">显示隐藏</button>
  <hr />
  <Child1 v-if="isShow"></Child1>
</template>
<script lang="ts">
import { defineComponent, ref } from "vue";
import Child1 from "./components/Child1.vue";
export default defineComponent({
  name: "App",
  components: {
    Child1,
  },
  setup() {
    let isShow = ref(true);
    return {
      isShow
    };
  },
});
</script>

<style>
</style>
